#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "common.h"

int icheck_url(char* purl)
{
    char surl1[QUART_K_SIZE];
	memset(surl1, 0, QUART_K_SIZE);
	
	if(*purl == '/') { //相对路径
		return 0;
	}
	
	snprintf(surl1, QUART_K_SIZE, "http://%s", g_ohttpinfo.m_sdns);
	if(strncmp(surl1, purl, strlen(surl1)) == 0 ) { //绝对路径，返回相对路径
		return strlen(surl1);
	} 
	
	//不是本网站的路径
	
	return -1;
}